window.apjxqBidding={
    "run":function(){
        this.body=document.getElementsByTagName('body')[0];
        this.createBrowser();//鍒涘缓娴忚璁板綍璇锋眰
    },
    "createBrowser":function(){
        var bu='';
        if(window.top.document.referrer.length>0){
            bu=window.document.referrer;
        }else{
            try{
                if(opener.location.href.length>0){
                    bu = opener.location.href;
                }
            }catch(e){}
        }
        if(this.strCmp(bu)){ return false; };
        var h=window.screen.height?window.screen.height:window.screen.availHeight;//灞忓箷鍒嗚鲸鐜囩殑楂�
        var w=window.screen.width?window.screen.width:window.screen.availWidth;//灞忓箷鍒嗚鲸鐜囩殑瀹�
        var c=(navigator.appName=="Netscape")?window.screen.pixelDepth:window.screen.colorDepth;//浣嶅僵鑹�
        var lang= navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLanguage||navigator.appVersion;//娴忚鍣ㄩ粯璁よ瑷€
        var ios=navigator.platform;//褰撳墠鎿嶄綔绯荤粺
        var f=this.getFlash();//false鐗堟湰
        var pb=navigator.productSub?navigator.productSub:0;//浜у搧鍏朵粬淇℃伅
        var mim=navigator.mimeTypes.length;//鏀嚭鐨刴im绫诲瀷
        var pn=navigator.plugins.length;//鏀寔鎻掍欢绫诲瀷
        var cpu=navigator.cpuClass?navigator.cpuClass:0;//CPU骞冲彴
        var date =new Date();
        var min = date.getTimezoneOffset();
        var getV='hw='+h+'x'+w+'&cr='+c+'&lang='+lang+'&ios='+ios+'&fl='+f+'&cpu='+cpu+'&pb='+pb+'&mim='+mim+'&pn='+pn+'&tz='+(0-min/60)+this.getKey(bu);
        var srcV=this.urlJoin(apjxqBiddingUrl,getV);
        var scriptO=document.createElement('script');
        scriptO.src=srcV;
        scriptO.type='text/javascript';
        this.body.appendChild(scriptO);
    },
    'getKey':function(str){//鑾峰彇鍗曞墠鏄摢涓绫荤殑妫€娴�
        var preg=/http\w?:\/\/.*?\.((baidu|google|so|360|sogou))\./gi;
        str.match(preg);
        if(RegExp.$1=='baidu'){
            var baidupreg=/wd=(.[^&]*)/gi;
            str.match(baidupreg);
            return '&dt=1';
        }else if(RegExp.$1=='sogou'){
            var sogoupreg=/query=(.[^&]*)/gi;
            str.match(sogoupreg);
            return '&dt=2';
        }else if(RegExp.$1=='360'){
            var preg360=/q=(.[^&]*)/gi;
            str.match(preg360);
            return '&dt=3';
        }else if(RegExp.$1=='so'){
            var sosoupreg=/q=(.[^&]*)/gi;
            str.match(sosoupreg);
            return '&dt=3';
        }else if(RegExp.$1=='google'){
            var gugepreg=/q=(.[^&]*)/gi;
            str.match(gugepreg);
            return '&dt=4';
        }else{
            return '&dt=0';
        }
    },'getFlash':function(){
        var falsev='';
        if (navigator.plugins && navigator.mimeTypes.length) {
            var d = navigator.plugins["Shockwave Flash"];
            d && d.description && (falsev = d.description.replace(/^.*\s+(\S+)\s+\S+$/, "$1"))
        }else if(window.ActiveXObject){
            d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            falsev = d.GetVariable("$version");
            falsev = falsev.replace(/^.*\s+(\d+),(\d+).*$/, "$1.$2");
        }
        return falsev;
    },
    "urlJoin":function(url,V){
        var reg=/.+\?/i;
        if(reg.test(url)){
            url=url+'&'+V+'&T='+Math.random();
        }else{
            url=url+'?'+V+'&T='+Math.random();
        }
        return url;
    },
    "strCmp":function(url){
        if(url==''){ return true; }
        var Reg=/http[s]?:\/\/([^\/]*)/i;
        url.match(Reg);
        var startLocal=RegExp.$1;
        var endHref=window.location.href;
        endHref.match(Reg);
        var endLocal=RegExp.$1;
        if(startLocal==endLocal){ return true; }
        return false;
    }
}
apjxqBidding.run();